-- GENERATED SPELL FOR [Shrieker Scarab] --


function spell0_15461(pUnit, Event) --@Berserker Charge,n/a--
pUnit:FullCastSpellOnTarget(22886,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15461', 606, 1)
end

function spell1_15461(pUnit, Event) --@Piercing Shriek,Self--
pUnit:FullCastSpellOnTarget(26379,pUnit)
pUnit:RegisterEvent('Sorts_15461', 6265, 1)
end

function Sorts_15461(pUnit, Event)
local choix_sorts_15461 = math.random(0, 1)
if choix_sorts_15461 == 0 then
pUnit:RegisterEvent('spell0_15461', 1, 1)
end
if choix_sorts_15461 == 1 then
pUnit:RegisterEvent('spell1_15461', 1, 1)
end
end

function mob15461_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15461', math.random(1500, 3000), 1)
end

function mob15461_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15461_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15461_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15461, 1, 'mob15461_Action')
RegisterUnitEvent(15461, 2, 'mob15461_Leave')
RegisterUnitEvent(15461, 3, 'mob15461_Kill')
RegisterUnitEvent(15461, 4, 'mob15461_Die')
